<template>
    <span v-if="showContent">
        <slot></slot>
    </span>
</template>
<script>
    import {AjaxByAll} from '@/api/api'

    export default {
        data() {
            return {
                showContent: false,


            }
        },
        methods: {
            getAuthCheckResult() {


                    let form = {
                        "checkUrl": this.checkUrl,
                        "methodType": this.methodType,
                        "perCode": this.perCode
                    }
                    //查找是否有权限
                    AjaxByAll('get', 'gateway/auth/common/getData/authCheckService', form).then(data => {
                        if (data.code === 200) {
                            this.showContent = data.data

                        }
                    });

            }


        },
        watch: {},
        mounted: function () {
            this.getAuthCheckResult();

        },
        props: {

            checkUrl: String,
            methodType: String,
            perCode: String
        }
    }
</script>

<style>

</style>
